package com.budwk.app.sqfw.enums;

import lombok.Getter;

/**
 * 金阳街道excel表格类型
 */
@Getter
public enum JinYangExcelType {

    VISITS_INSPECTION(1, "走访巡查集合"),
    GAS_INSPECTION(2, "燃气检查集合"),
    GAS_RECTIFICATION(3, "燃气整改情况"),
    SAFETY_HIDDEN(4, "安全隐患台账");

    private final Integer code;
    private final String name;

    JinYangExcelType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 通过code获取登录客户端类型
     *
     * @param code
     * @return
     */
    public static String getName(Integer code) {
        for (JinYangExcelType o : JinYangExcelType.values()) {
            if (o.getCode() == code) {
                return o.getName();
            }
        }
        return null;
    }
}
